import requests


class IHRMLoginAPL:
    # 登陆成功
    @classmethod
    def login_api(cls, json_data):
        url = "http://ihrm-test.itheima.net/api/sys/login"
        header = {"Content-Type": "application/json"}
        resp = requests.post(url=url, headers=header, json=json_data)
        return resp

    # @classmethod
    # def ih_assert(cls, resp, status_code, success, code, message):
    #     assert resp.status_code == status_code
    #     assert resp.json().get("success") == success
    #     assert resp.json().get("code") == code
    #     assert resp.json().get("message") == message
